﻿using System.IO;
using FizzBuzz.OutputProviders;
using NUnit.Framework;

namespace FizzBuzz.Tests
{
    [TestFixture]
    public class FizzBuzzFileOutputTestFixture
    {
        [TestFixtureTearDown]
        public void testTearDown()
        {
            var destination = @"C:\FizzBuzzTestTomLaZelle";
            if (Directory.Exists(destination))
            {
                Directory.Delete(destination,true);
            }

        }

        [Test,Explicit("This test will create a directory and write a test file to the directory")]
        public void can_invoke_fileprovider_and_render_with_success()
        {
            var destination = @"C:\FizzBuzzTestTomLaZelle";
            var fileName = "test.txt";
            var provider = new FileProvider(destination, fileName);

            provider.Render(1,"I am test #1");

            Assert.That(Directory.Exists(destination),Is.True);
            Assert.That(File.Exists(destination + @"\" + fileName),Is.True);

        }
    }
}